package com;

public class MylinkList {
     Node first  ;
     int num = 0;

    public boolean add(int hello) {
        Node sleepy = new Node(hello);
        if (num == 0){
            first = sleepy;
            num++;
            return true;
        }
        findNode(num-1).next = sleepy;
        num++;

        return true;
    }


    public Node findNode(int index){
        Node now = first;
        for (int i = 0 ; i < index ; i++){
            now = now.next;
        }
        return now;
    }

}
